"""
循环案例：发工资
"""
# 定义账户余额变量
money = 3000
# for循环对员工发工资
for i in range(1, 21):
    import random
    score = random.randint(1, 10)
    # print(score)
    if score < 5:
        print(f"员工{i},绩效分{score},低于5分，不发工资")
        # continue跳过发放
        continue
    else:
        money -= 1000
        print(f"员工{i},发放工资1000元，账户剩余{money}")
        #  判断余额
        if money == 0:
            print(f"余额不足，当前余额{money}")
            # 结束发放
            break
